#ifndef FLOATBUTTON_H
#define FLOATBUTTON_H

#include <QPushButton>
#include <QMouseEvent>
#include <QPoint>

class FloatButton : public QPushButton
{
    Q_OBJECT
public:
    explicit FloatButton(QWidget *parent = nullptr);

public slots:
    void mousePressEvent(QMouseEvent *e) override;
    void mouseMoveEvent(QMouseEvent *e) override;
    void mouseReleaseEvent(QMouseEvent *e) override;

private:
    QPoint m_dragPos;
    bool m_dragging = false;

signals:
};

#endif // FLOATBUTTON_H
